/*
 * GameObject.h
 *
 *  Created on: 17/05/2013
 *      Author: vitor
 */

#ifndef GAMEOBJECT_H_
#define GAMEOBJECT_H_

#include "Point.h"
#include "Rect.h"
#include <math.h>
#include <stdio.h>

class GameObject {
private:
	bool valueInRange(float value, float min, float max);
protected:
	Rect box;

public:
	GameObject(float x, float y, float w, float h);
	GameObject(Point position, float w, float h);
	virtual int update(double dt) = 0;
	virtual void render(float cameraX, float cameraY) = 0;
	virtual ~GameObject();

	bool collidesWith(GameObject* other);

	Rect* getBox() {
		return &box;
	}
};

#endif /* GAMEOBJECT_H_ */
